package model

import "time"

type Follows struct {
	FollowId   uint      `gorm:"column:follow_id;type:bigint UNSIGNED;comment:主键;primaryKey;not null;" json:"follow_id"` // 主键
	FollowerId uint      `gorm:"column:follower_id;type:bigint UNSIGNED;comment:用户1;not null;" json:"follower_id"`       // 用户1
	FollowedId uint      `gorm:"column:followed_id;type:bigint UNSIGNED;comment:用户2;not null;" json:"followed_id"`       // 用户2
	FollowTime time.Time `gorm:"column:follow_time;type:datetime(3);comment:关注时间;not null;" json:"follow_time"`          // 关注时间
	Status     uint      `gorm:"column:status;type:bigint UNSIGNED;comment:状态 0:取消关注 1:已关注;not null;" json:"status"`     // 状态 0:取消关注 1:已关注
	CreatedAt  time.Time `gorm:"column:created_at;type:datetime(3);not null;" json:"created_at"`
}

func (f *Follows) TableName() string {
	return "follows"
}
